package com.googlecode.recycled.lang.jse.api.io;

import java.io.File;
import java.io.FileFilter;
import java.io.FilenameFilter;

public class FileFilterAdapter implements FileFilter {

    protected FilenameFilter filenameFilter;

    public FileFilterAdapter(FilenameFilter filenameFilter) {
        this.filenameFilter = filenameFilter;
    }

    @Override
    public boolean accept(File file) {
        return filenameFilter.accept(file.getParentFile(), file.getName());
    }

}
